package com.xiaoyg.lession01.chapter17;

/**
 * isInterrupted　获取线程状态，但是不清楚状态标志
 */
public class Run3 {

    public static void main(String[] args) {
        try {
            MyThread thread = new MyThread();
            thread.start();
            Thread.sleep(1000);
            thread.interrupt();
            System.out.println("是否停止１? ="+thread.isInterrupted()+"==============================");
            System.out.println("是否停止２？ ="+thread.isInterrupted());
            return;
        } catch (InterruptedException e) {
            System.out.println("main catch");
            e.printStackTrace();
        }
        System.out.println("end!");
    }

}
